# !/usr/bin/env python
# -*- coding:utf-8 -*-
# 爬取搜狗首页页面数据
import requests

if __name__ == '__main__':
    url = 'https://www.sogou.com/'  # 制定URL
    page = requests.get(url)    # 发起请求，获得服务器响应
    # print(page)
    text = page.text    # 获得页面数据
    print(text)
    with open('sougou.html', 'w', encoding='utf-8') as fp:  # 持久化存储
        fp.write(text)


